<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.12.0"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>NeuZephyr: nz::nodes::io::InputNode Class Reference</title>
<link rel="icon" href="NZ_logo2.png" type="image/x-icon" />
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectlogo"><img alt="Logo" src="NZ_logo2.png"/></td>
  <td id="projectalign">
   <div id="projectname">NeuZephyr
   </div>
   <div id="projectbrief">Simple DL Framework</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.12.0 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() { codefold.init(0); });
/* @license-end */
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function(){ initResizable(false); });
/* @license-end */
</script>
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><b>nz</b></li><li class="navelem"><a class="el" href="namespacenz_1_1nodes.html">nodes</a></li><li class="navelem"><a class="el" href="namespacenz_1_1nodes_1_1io.html">io</a></li><li class="navelem"><a class="el" href="classnz_1_1nodes_1_1io_1_1_input_node.html">InputNode</a></li>  </ul>
</div>
</div><!-- top -->
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classnz_1_1nodes_1_1io_1_1_input_node-members.html">List of all members</a>  </div>
  <div class="headertitle"><div class="title">nz::nodes::io::InputNode Class Reference</div></div>
</div><!--header-->
<div class="contents">

<p>Represents an input node in a computational graph.  
 <a href="#details">More...</a></p>
<div class="dynheader">
Inheritance diagram for nz::nodes::io::InputNode:</div>
<div class="dyncontent">
<div class="center"><img src="classnz_1_1nodes_1_1io_1_1_input_node__inherit__graph.png" border="0" usemap="#anz_1_1nodes_1_1io_1_1_input_node_inherit__map" alt="Inheritance graph"/></div>
<map name="anz_1_1nodes_1_1io_1_1_input_node_inherit__map" id="anz_1_1nodes_1_1io_1_1_input_node_inherit__map">
<area shape="rect" title="Represents an input node in a computational graph." alt="" coords="5,80,170,107"/>
<area shape="rect" href="classnz_1_1nodes_1_1_node.html" title="Base class for nodes in a neural network or computational graph." alt="" coords="29,5,146,32"/>
<area shape="poly" title=" " alt="" coords="90,48,90,80,85,80,85,48"/>
</map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
<div class="dynheader">
Collaboration diagram for nz::nodes::io::InputNode:</div>
<div class="dyncontent">
<div class="center"><img src="classnz_1_1nodes_1_1io_1_1_input_node__coll__graph.png" border="0" usemap="#anz_1_1nodes_1_1io_1_1_input_node_coll__map" alt="Collaboration graph"/></div>
<map name="anz_1_1nodes_1_1io_1_1_input_node_coll__map" id="anz_1_1nodes_1_1io_1_1_input_node_coll__map">
<area shape="rect" title="Represents an input node in a computational graph." alt="" coords="5,80,170,107"/>
<area shape="rect" href="classnz_1_1nodes_1_1_node.html" title="Base class for nodes in a neural network or computational graph." alt="" coords="29,5,146,32"/>
<area shape="poly" title=" " alt="" coords="90,48,90,80,85,80,85,48"/>
</map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a217dbf39ca3882f5e514357f72f29458" id="r_a217dbf39ca3882f5e514357f72f29458"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a217dbf39ca3882f5e514357f72f29458">InputNode</a> (const <a class="el" href="classnz_1_1data_1_1_dimension.html">Tensor::shape_type</a> &amp;shape, bool requires_grad=false)</td></tr>
<tr class="memdesc:a217dbf39ca3882f5e514357f72f29458"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor to initialize an <code><a class="el" href="classnz_1_1nodes_1_1io_1_1_input_node.html" title="Represents an input node in a computational graph.">InputNode</a></code> with a specified shape and gradient requirement.  <br /></td></tr>
<tr class="separator:a217dbf39ca3882f5e514357f72f29458"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad3c9b52eaaff63ea2e47bf5bea6e342c" id="r_ad3c9b52eaaff63ea2e47bf5bea6e342c"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ad3c9b52eaaff63ea2e47bf5bea6e342c">InputNode</a> (const <a class="el" href="classnz_1_1data_1_1_tensor.html">Tensor</a> &amp;tensor)</td></tr>
<tr class="memdesc:ad3c9b52eaaff63ea2e47bf5bea6e342c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor to initialize an <code><a class="el" href="classnz_1_1nodes_1_1io_1_1_input_node.html" title="Represents an input node in a computational graph.">InputNode</a></code> with an existing <code>Tensor</code>.  <br /></td></tr>
<tr class="separator:ad3c9b52eaaff63ea2e47bf5bea6e342c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7092655e4fa2edee102018c327aa4995" id="r_a7092655e4fa2edee102018c327aa4995"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a7092655e4fa2edee102018c327aa4995">InputNode</a> (const <a class="el" href="classnz_1_1data_1_1_dimension.html">Tensor::shape_type</a> &amp;shape, Tensor::value_type *data, bool requires_grad=false, bool host=false)</td></tr>
<tr class="memdesc:a7092655e4fa2edee102018c327aa4995"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructs an <a class="el" href="classnz_1_1nodes_1_1io_1_1_input_node.html" title="Represents an input node in a computational graph.">InputNode</a> object with specified tensor shape, data, gradient requirement, and data location.  <br /></td></tr>
<tr class="separator:a7092655e4fa2edee102018c327aa4995"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a39a051c8a6b250b024fbd98feb959c63" id="r_a39a051c8a6b250b024fbd98feb959c63"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a39a051c8a6b250b024fbd98feb959c63">InputNode</a> (const <a class="el" href="classnz_1_1data_1_1_dimension.html">Tensor::shape_type</a> &amp;shape, const std::initializer_list&lt; Tensor::value_type &gt; &amp;data, bool requires_grad=false)</td></tr>
<tr class="memdesc:a39a051c8a6b250b024fbd98feb959c63"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructs an <a class="el" href="classnz_1_1nodes_1_1io_1_1_input_node.html" title="Represents an input node in a computational graph.">InputNode</a> object with a specified tensor shape, initializer list data, and gradient requirement.  <br /></td></tr>
<tr class="separator:a39a051c8a6b250b024fbd98feb959c63"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4ba34603676c094723409d9e6b770976" id="r_a4ba34603676c094723409d9e6b770976"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a4ba34603676c094723409d9e6b770976">forward</a> () override</td></tr>
<tr class="memdesc:a4ba34603676c094723409d9e6b770976"><td class="mdescLeft">&#160;</td><td class="mdescRight">Forward pass for the <code><a class="el" href="classnz_1_1nodes_1_1io_1_1_input_node.html" title="Represents an input node in a computational graph.">InputNode</a></code>.  <br /></td></tr>
<tr class="separator:a4ba34603676c094723409d9e6b770976"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3cde8af9401a117601dcdb0c9063516a" id="r_a3cde8af9401a117601dcdb0c9063516a"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a3cde8af9401a117601dcdb0c9063516a">backward</a> () override</td></tr>
<tr class="memdesc:a3cde8af9401a117601dcdb0c9063516a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Backward pass for the <code><a class="el" href="classnz_1_1nodes_1_1io_1_1_input_node.html" title="Represents an input node in a computational graph.">InputNode</a></code>.  <br /></td></tr>
<tr class="separator:a3cde8af9401a117601dcdb0c9063516a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classnz_1_1nodes_1_1_node"><td colspan="2" onclick="javascript:dynsection.toggleInherit('pub_methods_classnz_1_1nodes_1_1_node')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="classnz_1_1nodes_1_1_node.html">nz::nodes::Node</a></td></tr>
<tr class="memitem:a687ee9c34eb61f8f28caa201ca42696e inherit pub_methods_classnz_1_1nodes_1_1_node" id="r_a687ee9c34eb61f8f28caa201ca42696e"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnz_1_1nodes_1_1_node.html#a687ee9c34eb61f8f28caa201ca42696e">print</a> (std::ostream &amp;os) const</td></tr>
<tr class="memdesc:a687ee9c34eb61f8f28caa201ca42696e inherit pub_methods_classnz_1_1nodes_1_1_node"><td class="mdescLeft">&#160;</td><td class="mdescRight">Prints the type, data, and gradient of the node.  <br /></td></tr>
<tr class="separator:a687ee9c34eb61f8f28caa201ca42696e inherit pub_methods_classnz_1_1nodes_1_1_node"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9b85913e12422bb4ac2fff483427bb47 inherit pub_methods_classnz_1_1nodes_1_1_node" id="r_a9b85913e12422bb4ac2fff483427bb47"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnz_1_1nodes_1_1_node.html#a9b85913e12422bb4ac2fff483427bb47">dataInject</a> (Tensor::value_type *data, bool grad=false) const</td></tr>
<tr class="memdesc:a9b85913e12422bb4ac2fff483427bb47 inherit pub_methods_classnz_1_1nodes_1_1_node"><td class="mdescLeft">&#160;</td><td class="mdescRight">Injects data into a relevant tensor object, optionally setting its gradient requirement.  <br /></td></tr>
<tr class="separator:a9b85913e12422bb4ac2fff483427bb47 inherit pub_methods_classnz_1_1nodes_1_1_node"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a609f1730085dd1d31e0ddcbbae48a065 inherit pub_methods_classnz_1_1nodes_1_1_node" id="r_a609f1730085dd1d31e0ddcbbae48a065"><td class="memTemplParams" colspan="2">template&lt;typename Iterator &gt; </td></tr>
<tr class="memitem:a609f1730085dd1d31e0ddcbbae48a065 inherit pub_methods_classnz_1_1nodes_1_1_node"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classnz_1_1nodes_1_1_node.html#a609f1730085dd1d31e0ddcbbae48a065">dataInject</a> (Iterator begin, Iterator end, const bool grad=false) const</td></tr>
<tr class="memdesc:a609f1730085dd1d31e0ddcbbae48a065 inherit pub_methods_classnz_1_1nodes_1_1_node"><td class="mdescLeft">&#160;</td><td class="mdescRight">Injects data from an iterator range into the output tensor of the InputNode, optionally setting its gradient requirement.  <br /></td></tr>
<tr class="separator:a609f1730085dd1d31e0ddcbbae48a065 inherit pub_methods_classnz_1_1nodes_1_1_node"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af8b4bab3271df92ca1f0914f7a97b1e8 inherit pub_methods_classnz_1_1nodes_1_1_node" id="r_af8b4bab3271df92ca1f0914f7a97b1e8"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnz_1_1nodes_1_1_node.html#af8b4bab3271df92ca1f0914f7a97b1e8">dataInject</a> (const std::initializer_list&lt; Tensor::value_type &gt; &amp;data, bool grad=false) const</td></tr>
<tr class="memdesc:af8b4bab3271df92ca1f0914f7a97b1e8 inherit pub_methods_classnz_1_1nodes_1_1_node"><td class="mdescLeft">&#160;</td><td class="mdescRight">Injects data from a std::initializer_list into the output tensor of the <a class="el" href="classnz_1_1nodes_1_1_node.html" title="Base class for nodes in a neural network or computational graph.">Node</a>, optionally setting its gradient requirement.  <br /></td></tr>
<tr class="separator:af8b4bab3271df92ca1f0914f7a97b1e8 inherit pub_methods_classnz_1_1nodes_1_1_node"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Represents an input node in a computational graph. </p>
<p>The <code><a class="el" href="classnz_1_1nodes_1_1io_1_1_input_node.html" title="Represents an input node in a computational graph.">InputNode</a></code> class is a subclass of <code><a class="el" href="classnz_1_1nodes_1_1_node.html" title="Base class for nodes in a neural network or computational graph.">Node</a></code>, representing a node that holds the input data for a neural network or computational graph. It is designed to store the input tensor and pass it forward through the graph. <code><a class="el" href="classnz_1_1nodes_1_1io_1_1_input_node.html" title="Represents an input node in a computational graph.">InputNode</a></code> does not perform any computations in the forward or backward passes; its main role is to provide input data to the network.</p>
<p>Key features:</p><ul>
<li><b>Tensor Output</b>: The <code><a class="el" href="classnz_1_1nodes_1_1io_1_1_input_node.html" title="Represents an input node in a computational graph.">InputNode</a></code> stores a <code>Tensor</code> as its output, which is initialized either from a shape or an existing tensor.</li>
<li><b>No Forward or Backward Operations</b>: The <code><a class="el" href="#a4ba34603676c094723409d9e6b770976" title="Forward pass for the InputNode.">forward()</a></code> and <code><a class="el" href="#a3cde8af9401a117601dcdb0c9063516a" title="Backward pass for the InputNode.">backward()</a></code> methods are implemented as empty, since this node only provides input data and does not modify the network during these passes.</li>
<li><b>Shape and Gradient Support</b>: The shape of the input tensor and whether it requires gradients is configurable during initialization.</li>
</ul>
<p>This class is part of the <code><a class="el" href="namespacenz_1_1nodes.html" title="Contains classes and functionality for nodes in a neural network or computational graph.">nz::nodes</a></code> namespace and serves as a fundamental part of the computational graph, providing input data to the network during the forward pass.</p>
<dl class="section note"><dt>Note</dt><dd><ul>
<li>The <code><a class="el" href="#a4ba34603676c094723409d9e6b770976" title="Forward pass for the InputNode.">forward()</a></code> and <code><a class="el" href="#a3cde8af9401a117601dcdb0c9063516a" title="Backward pass for the InputNode.">backward()</a></code> methods are implemented but do not perform any operations for the <code><a class="el" href="classnz_1_1nodes_1_1io_1_1_input_node.html" title="Represents an input node in a computational graph.">InputNode</a></code>.</li>
<li>This class is designed to be used as the starting point of a computational graph, where other nodes depend on the input data provided by this node.</li>
</ul>
</dd></dl>
<h3><a class="anchor" id="autotoc_md87"></a>
Usage Example:</h3>
<div class="fragment"><div class="line"><span class="comment">// Example 1: Creating an InputNode with a specific shape</span></div>
<div class="line"><a class="code hl_class" href="classnz_1_1data_1_1_dimension.html">Tensor::shape_type</a> shape = {3, 3};  <span class="comment">// Define a 3x3 tensor</span></div>
<div class="line"><a class="code hl_class" href="classnz_1_1nodes_1_1io_1_1_input_node.html">InputNode</a> input_node(shape, <span class="keyword">true</span>);  <span class="comment">// Create an InputNode with shape {3, 3} and requires_grad = true</span></div>
<div class="line">input_node.output-&gt;fill(0.5f);  <span class="comment">// Fill the input tensor with a value of 0.5</span></div>
<div class="line"> </div>
<div class="line"><span class="comment">// Example 2: Creating an InputNode from an existing tensor</span></div>
<div class="line"><a class="code hl_class" href="classnz_1_1data_1_1_tensor.html">Tensor</a> existing_tensor({2, 2});</div>
<div class="line">existing_tensor.<a class="code hl_function" href="classnz_1_1data_1_1_tensor.html#ad220de56b18c404611f07f2290cd7e9d">fill</a>(1.0f);  <span class="comment">// Fill the existing tensor with 1.0</span></div>
<div class="line"><a class="code hl_function" href="#a217dbf39ca3882f5e514357f72f29458">InputNode</a> input_node_from_tensor(existing_tensor);  <span class="comment">// Create an InputNode from the existing tensor</span></div>
<div class="line"> </div>
<div class="line"><span class="comment">// Example 3: Using InputNode in a computational graph</span></div>
<div class="line"><a class="code hl_function" href="#a217dbf39ca3882f5e514357f72f29458">InputNode</a> input_node({4, 4});  <span class="comment">// Create an InputNode with shape {4, 4}</span></div>
<div class="line">input_node.output-&gt;fill(2.0f);  <span class="comment">// Fill the tensor with the value 2.0</span></div>
<div class="line"> </div>
<div class="line"><span class="comment">// In the network, this node will pass the data to subsequent nodes during forward propagation.</span></div>
<div class="ttc" id="aclassnz_1_1data_1_1_dimension_html"><div class="ttname"><a href="classnz_1_1data_1_1_dimension.html">nz::data::Dimension</a></div><div class="ttdoc">Represents a multi - dimensional shape, typically used in deep learning for tensor dimensions.</div><div class="ttdef"><b>Definition</b> <a href="_dimension_8cuh_source.html#l00057">Dimension.cuh:57</a></div></div>
<div class="ttc" id="aclassnz_1_1data_1_1_tensor_html"><div class="ttname"><a href="classnz_1_1data_1_1_tensor.html">nz::data::Tensor</a></div><div class="ttdoc">A class for representing and manipulating multidimensional arrays (tensors) in GPU memory.</div><div class="ttdef"><b>Definition</b> <a href="_tensor_8cuh_source.html#l00134">Tensor.cuh:134</a></div></div>
<div class="ttc" id="aclassnz_1_1data_1_1_tensor_html_ad220de56b18c404611f07f2290cd7e9d"><div class="ttname"><a href="classnz_1_1data_1_1_tensor.html#ad220de56b18c404611f07f2290cd7e9d">nz::data::Tensor::fill</a></div><div class="ttdeci">void fill(value_type value, bool isGrad=false) const</div><div class="ttdoc">Fills the tensor's data with a specified value.</div><div class="ttdef"><b>Definition</b> <a href="_tensor_8cu_source.html#l00306">Tensor.cu:306</a></div></div>
<div class="ttc" id="aclassnz_1_1nodes_1_1io_1_1_input_node_html"><div class="ttname"><a href="classnz_1_1nodes_1_1io_1_1_input_node.html">nz::nodes::io::InputNode</a></div><div class="ttdoc">Represents an input node in a computational graph.</div><div class="ttdef"><b>Definition</b> <a href="_nodes_8cuh_source.html#l00437">Nodes.cuh:437</a></div></div>
<div class="ttc" id="aclassnz_1_1nodes_1_1io_1_1_input_node_html_a217dbf39ca3882f5e514357f72f29458"><div class="ttname"><a href="#a217dbf39ca3882f5e514357f72f29458">nz::nodes::io::InputNode::InputNode</a></div><div class="ttdeci">InputNode(const Tensor::shape_type &amp;shape, bool requires_grad=false)</div><div class="ttdoc">Constructor to initialize an InputNode with a specified shape and gradient requirement.</div><div class="ttdef"><b>Definition</b> <a href="_nodes_8cu_source.html#l00024">Nodes.cu:24</a></div></div>
</div><!-- fragment --><dl class="section author"><dt>Author</dt><dd>Mgepahmge (<a href="https://github.com/Mgepahmge">https://github.com/Mgepahmge</a>)</dd></dl>
<dl class="section date"><dt>Date</dt><dd>2024/11/29 </dd></dl>

<p class="definition">Definition at line <a class="el" href="_nodes_8cuh_source.html#l00437">437</a> of file <a class="el" href="_nodes_8cuh_source.html">Nodes.cuh</a>.</p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a217dbf39ca3882f5e514357f72f29458" name="a217dbf39ca3882f5e514357f72f29458"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a217dbf39ca3882f5e514357f72f29458">&#9670;&#160;</a></span>InputNode() <span class="overload">[1/4]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">nz::nodes::io::InputNode::InputNode </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classnz_1_1data_1_1_dimension.html">Tensor::shape_type</a> &amp;</td>          <td class="paramname"><span class="paramname"><em>shape</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool</td>          <td class="paramname"><span class="paramname"><em>requires_grad</em></span><span class="paramdefsep"> = </span><span class="paramdefval">false</span>&#160;)</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">explicit</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Constructor to initialize an <code><a class="el" href="classnz_1_1nodes_1_1io_1_1_input_node.html" title="Represents an input node in a computational graph.">InputNode</a></code> with a specified shape and gradient requirement. </p>
<p>This constructor initializes an <code><a class="el" href="classnz_1_1nodes_1_1io_1_1_input_node.html" title="Represents an input node in a computational graph.">InputNode</a></code> that holds a tensor with the specified shape. The tensor is created with the specified shape, and it can optionally track gradients if <code>requires_grad</code> is set to <code>true</code>. The <code><a class="el" href="classnz_1_1nodes_1_1io_1_1_input_node.html" title="Represents an input node in a computational graph.">InputNode</a></code> does not perform any computations; its primary role is to hold and provide input data to the computational graph.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">shape</td><td>The shape of the tensor to be stored in the <code><a class="el" href="classnz_1_1nodes_1_1io_1_1_input_node.html" title="Represents an input node in a computational graph.">InputNode</a></code>. This defines the dimensions of the input data. </td></tr>
    <tr><td class="paramname">requires_grad</td><td>A boolean flag indicating whether the tensor should track gradients. Defaults to <code>false</code>.</td></tr>
  </table>
  </dd>
</dl>
<p>The <code><a class="el" href="classnz_1_1nodes_1_1io_1_1_input_node.html" title="Represents an input node in a computational graph.">InputNode</a></code> will store a <code>Tensor</code> object, initialized with the given shape and gradient tracking setting. This tensor can then be used as input for subsequent nodes in the computational graph.</p>
<dl class="section note"><dt>Note</dt><dd><ul>
<li>The <code><a class="el" href="classnz_1_1nodes_1_1io_1_1_input_node.html" title="Represents an input node in a computational graph.">InputNode</a></code> class does not perform any computations during the forward or backward passes. It simply stores and provides input data.</li>
<li><code>requires_grad</code> determines whether the input tensor will store gradients, which is useful if the input data is part of the network's parameters.</li>
</ul>
</dd></dl>
<dl class="section author"><dt>Author</dt><dd>Mgepahmge (<a href="https://github.com/Mgepahmge">https://github.com/Mgepahmge</a>)</dd></dl>
<dl class="section date"><dt>Date</dt><dd>2024/11/29 </dd></dl>

<p class="definition">Definition at line <a class="el" href="_nodes_8cu_source.html#l00024">24</a> of file <a class="el" href="_nodes_8cu_source.html">Nodes.cu</a>.</p>

</div>
</div>
<a id="ad3c9b52eaaff63ea2e47bf5bea6e342c" name="ad3c9b52eaaff63ea2e47bf5bea6e342c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad3c9b52eaaff63ea2e47bf5bea6e342c">&#9670;&#160;</a></span>InputNode() <span class="overload">[2/4]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">nz::nodes::io::InputNode::InputNode </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classnz_1_1data_1_1_tensor.html">Tensor</a> &amp;</td>          <td class="paramname"><span class="paramname"><em>tensor</em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">explicit</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Constructor to initialize an <code><a class="el" href="classnz_1_1nodes_1_1io_1_1_input_node.html" title="Represents an input node in a computational graph.">InputNode</a></code> with an existing <code>Tensor</code>. </p>
<p>This constructor initializes an <code><a class="el" href="classnz_1_1nodes_1_1io_1_1_input_node.html" title="Represents an input node in a computational graph.">InputNode</a></code> using an existing <code>Tensor</code> object. The <code>Tensor</code> object is directly assigned to the <code>output</code> of the <code><a class="el" href="classnz_1_1nodes_1_1io_1_1_input_node.html" title="Represents an input node in a computational graph.">InputNode</a></code>, allowing the node to use the provided tensor as its input data. The <code><a class="el" href="classnz_1_1nodes_1_1io_1_1_input_node.html" title="Represents an input node in a computational graph.">InputNode</a></code> does not perform any computations but simply holds and provides the given tensor data to the computational graph.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">tensor</td><td>The existing <code>Tensor</code> object to be used as the input for the <code><a class="el" href="classnz_1_1nodes_1_1io_1_1_input_node.html" title="Represents an input node in a computational graph.">InputNode</a></code>. This tensor contains the input data to be passed through the network.</td></tr>
  </table>
  </dd>
</dl>
<p>The <code><a class="el" href="classnz_1_1nodes_1_1io_1_1_input_node.html" title="Represents an input node in a computational graph.">InputNode</a></code> stores the provided tensor in its <code>output</code> member, which will be used by other nodes in the graph.</p>
<dl class="section note"><dt>Note</dt><dd><ul>
<li>The <code><a class="el" href="classnz_1_1nodes_1_1io_1_1_input_node.html" title="Represents an input node in a computational graph.">InputNode</a></code> does not modify the given tensor, it simply holds a reference to it.</li>
<li>This constructor is useful when you already have a tensor (e.g., loaded from a file or created elsewhere) and want to use it as input to the computational graph.</li>
</ul>
</dd></dl>
<dl class="section author"><dt>Author</dt><dd>Mgepahmge (<a href="https://github.com/Mgepahmge">https://github.com/Mgepahmge</a>)</dd></dl>
<dl class="section date"><dt>Date</dt><dd>2024/11/29 </dd></dl>

<p class="definition">Definition at line <a class="el" href="_nodes_8cu_source.html#l00029">29</a> of file <a class="el" href="_nodes_8cu_source.html">Nodes.cu</a>.</p>

</div>
</div>
<a id="a7092655e4fa2edee102018c327aa4995" name="a7092655e4fa2edee102018c327aa4995"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7092655e4fa2edee102018c327aa4995">&#9670;&#160;</a></span>InputNode() <span class="overload">[3/4]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">nz::nodes::io::InputNode::InputNode </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classnz_1_1data_1_1_dimension.html">Tensor::shape_type</a> &amp;</td>          <td class="paramname"><span class="paramname"><em>shape</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">Tensor::value_type *</td>          <td class="paramname"><span class="paramname"><em>data</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool</td>          <td class="paramname"><span class="paramname"><em>requires_grad</em></span><span class="paramdefsep"> = </span><span class="paramdefval">false</span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool</td>          <td class="paramname"><span class="paramname"><em>host</em></span><span class="paramdefsep"> = </span><span class="paramdefval">false</span>&#160;)</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">explicit</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Constructs an <a class="el" href="classnz_1_1nodes_1_1io_1_1_input_node.html" title="Represents an input node in a computational graph.">InputNode</a> object with specified tensor shape, data, gradient requirement, and data location. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">shape</td><td>A reference to the shape of the output tensor of the input node (host-to-device). It defines the dimensions of the tensor. </td></tr>
    <tr><td class="paramname">data</td><td>A pointer to the initial data of the output tensor. The data can be either on the host or device depending on the <code>host</code> parameter. </td></tr>
    <tr><td class="paramname">requires_grad</td><td>A boolean indicating whether the output tensor requires gradient computation. </td></tr>
    <tr><td class="paramname">host</td><td>A boolean indicating whether the data pointed to by <code>data</code> is on the host or device. If true, data is on the host; otherwise, it is on the device.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>None. This is a constructor.</dd></dl>
<p>This constructor initializes an <code><a class="el" href="classnz_1_1nodes_1_1io_1_1_input_node.html" title="Represents an input node in a computational graph.">InputNode</a></code> object. It creates a new <code>Tensor</code> object using the provided <code>shape</code>, <code>data</code>, <code>requires_grad</code>, and <code>host</code> parameters and stores a shared pointer to this tensor in the <code>output</code> member variable.</p>
<p>In terms of memory management, the <code>std::shared_ptr</code> in <code>output</code> takes care of the memory of the <code>Tensor</code> object. When the last reference to the <code>Tensor</code> object held by a <code>std::shared_ptr</code> is destroyed, the <code>Tensor</code> object will be automatically deleted.</p>
<p>Regarding exception handling, this constructor does not explicitly catch any exceptions thrown by the <code>Tensor</code> constructor. If the <code>Tensor</code> constructor fails (e.g., due to insufficient memory or invalid input), the exception will propagate to the caller.</p>
<p>This constructor is a fundamental part of the <code><a class="el" href="classnz_1_1nodes_1_1io_1_1_input_node.html" title="Represents an input node in a computational graph.">InputNode</a></code> class as it initializes the output tensor of the input node.</p>
<dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname">None</td><td>explicitly, but the <code>Tensor</code> constructor may throw exceptions, such as <code>std::bad_alloc</code> if memory allocation fails.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd><ul>
<li>Ensure that the <code>data</code> pointer is valid and points to enough data to fill the tensor according to the specified shape.</li>
<li>The CUDA runtime environment should be properly initialized before calling this constructor if the tensor is using CUDA memory.</li>
<li>This constructor has a time complexity of O(1) for creating the <code>std::shared_ptr</code> and O(n) for the <code>Tensor</code> constructor, where n is the total number of elements in the tensor.</li>
</ul>
</dd></dl>
<div class="fragment"><div class="line">```cpp</div>
<div class="line"><span class="preprocessor">#include &lt;vector&gt;</span></div>
<div class="line"> </div>
<div class="line">shape_type shape = {2, 3};</div>
<div class="line">value_type data[] = {1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f};</div>
<div class="line"><span class="keywordflow">try</span> {</div>
<div class="line">    <a class="code hl_function" href="#a217dbf39ca3882f5e514357f72f29458">InputNode</a> inputNode(shape, data, <span class="keyword">true</span>, <span class="keyword">true</span>);</div>
<div class="line">} <span class="keywordflow">catch</span> (<span class="keyword">const</span> std::exception&amp; e) {</div>
<div class="line">    std::cerr &lt;&lt; e.what() &lt;&lt; std::endl;</div>
<div class="line">}</div>
<div class="line">```</div>
</div><!-- fragment --> 
<p class="definition">Definition at line <a class="el" href="_nodes_8cu_source.html#l00034">34</a> of file <a class="el" href="_nodes_8cu_source.html">Nodes.cu</a>.</p>

</div>
</div>
<a id="a39a051c8a6b250b024fbd98feb959c63" name="a39a051c8a6b250b024fbd98feb959c63"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a39a051c8a6b250b024fbd98feb959c63">&#9670;&#160;</a></span>InputNode() <span class="overload">[4/4]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">nz::nodes::io::InputNode::InputNode </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classnz_1_1data_1_1_dimension.html">Tensor::shape_type</a> &amp;</td>          <td class="paramname"><span class="paramname"><em>shape</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::initializer_list&lt; Tensor::value_type &gt; &amp;</td>          <td class="paramname"><span class="paramname"><em>data</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool</td>          <td class="paramname"><span class="paramname"><em>requires_grad</em></span><span class="paramdefsep"> = </span><span class="paramdefval">false</span>&#160;)</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">explicit</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Constructs an <a class="el" href="classnz_1_1nodes_1_1io_1_1_input_node.html" title="Represents an input node in a computational graph.">InputNode</a> object with a specified tensor shape, initializer list data, and gradient requirement. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">shape</td><td>A reference to the shape of the output tensor of the input node (host-to-device). It determines the dimensions and total size of the tensor. </td></tr>
    <tr><td class="paramname">data</td><td>A std::initializer_list containing the initial data for the output tensor (host-to-device). </td></tr>
    <tr><td class="paramname">requires_grad</td><td>A boolean indicating whether the output tensor requires gradient computation.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>None. This is a constructor.</dd></dl>
<p>This constructor initializes an <a class="el" href="classnz_1_1nodes_1_1io_1_1_input_node.html" title="Represents an input node in a computational graph.">InputNode</a> object. It creates a new Tensor object using the provided shape, initializer list data, and gradient requirement, and stores a shared pointer to this tensor in the output member variable.</p>
<p>For memory management, the std::shared_ptr in output takes care of the Tensor object's memory. When the last reference to the Tensor object held by a std::shared_ptr is destroyed, the Tensor object will be automatically deleted.</p>
<p>Regarding exception handling, this constructor does not explicitly catch any exceptions thrown by the Tensor constructor. If the Tensor constructor fails (e.g., due to insufficient memory or an invalid initializer list size), the exception will propagate to the caller.</p>
<p>This constructor is an important part of the <a class="el" href="classnz_1_1nodes_1_1io_1_1_input_node.html" title="Represents an input node in a computational graph.">InputNode</a> class as it provides a convenient way to initialize the output tensor of the input node with an initializer list.</p>
<dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname">None</td><td>explicitly, but the Tensor constructor may throw exceptions such as std::invalid_argument if the initializer list size is insufficient or std::bad_alloc if memory allocation fails.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd><ul>
<li>Ensure that the std::initializer_list contains enough elements to fill the tensor according to the specified shape.</li>
<li>The CUDA runtime environment should be properly initialized before calling this constructor if the tensor is using CUDA memory.</li>
<li>The time complexity of this constructor is O(1) for creating the std::shared_ptr and O(n) for the Tensor constructor, where n is the total number of elements in the tensor.</li>
</ul>
</dd></dl>
<div class="fragment"><div class="line">```cpp</div>
<div class="line"><span class="preprocessor">#include &lt;vector&gt;</span></div>
<div class="line"><span class="comment">// Assume Tensor::shape_type and Tensor::value_type are defined</span></div>
<div class="line"><span class="keyword">using </span>shape_type = std::vector&lt;size_t&gt;;</div>
<div class="line"><span class="keyword">using </span>value_type = float;</div>
<div class="line"> </div>
<div class="line">shape_type shape = {2, 3};</div>
<div class="line"><span class="keywordflow">try</span> {</div>
<div class="line">    <a class="code hl_class" href="classnz_1_1nodes_1_1io_1_1_input_node.html">InputNode</a> inputNode(shape, {1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f}, <span class="keyword">true</span>);</div>
<div class="line">} <span class="keywordflow">catch</span> (<span class="keyword">const</span> std::exception&amp; e) {</div>
<div class="line">    std::cerr &lt;&lt; e.what() &lt;&lt; std::endl;</div>
<div class="line">}</div>
<div class="line">```</div>
</div><!-- fragment --> 
<p class="definition">Definition at line <a class="el" href="_nodes_8cu_source.html#l00040">40</a> of file <a class="el" href="_nodes_8cu_source.html">Nodes.cu</a>.</p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a3cde8af9401a117601dcdb0c9063516a" name="a3cde8af9401a117601dcdb0c9063516a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3cde8af9401a117601dcdb0c9063516a">&#9670;&#160;</a></span>backward()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void nz::nodes::io::InputNode::backward </td>
          <td>(</td>
          <td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Backward pass for the <code><a class="el" href="classnz_1_1nodes_1_1io_1_1_input_node.html" title="Represents an input node in a computational graph.">InputNode</a></code>. </p>
<p>The <code><a class="el" href="#a3cde8af9401a117601dcdb0c9063516a" title="Backward pass for the InputNode.">backward()</a></code> method for the <code><a class="el" href="classnz_1_1nodes_1_1io_1_1_input_node.html" title="Represents an input node in a computational graph.">InputNode</a></code> is a no-op (no operation) because the input node does not participate in the backpropagation process. It does not have any parameters or gradients to update, as its role is simply to provide the input data to the computational graph.</p>
<p>Since the <code><a class="el" href="classnz_1_1nodes_1_1io_1_1_input_node.html" title="Represents an input node in a computational graph.">InputNode</a></code> does not modify any data during the backward pass, the <code><a class="el" href="#a3cde8af9401a117601dcdb0c9063516a" title="Backward pass for the InputNode.">backward()</a></code> method does not need to perform any operations, and it is left empty. Gradients will not be propagated from this node to any other nodes, as the <code><a class="el" href="classnz_1_1nodes_1_1io_1_1_input_node.html" title="Represents an input node in a computational graph.">InputNode</a></code> does not require gradients.</p>
<dl class="section note"><dt>Note</dt><dd><ul>
<li>This method is a required implementation due to inheritance from the abstract <code><a class="el" href="classnz_1_1nodes_1_1_node.html" title="Base class for nodes in a neural network or computational graph.">Node</a></code> class, but it does not perform any operations for <code><a class="el" href="classnz_1_1nodes_1_1io_1_1_input_node.html" title="Represents an input node in a computational graph.">InputNode</a></code>. It serves as a placeholder to conform to the <code><a class="el" href="classnz_1_1nodes_1_1_node.html" title="Base class for nodes in a neural network or computational graph.">Node</a></code> class interface.</li>
<li>The <code><a class="el" href="classnz_1_1nodes_1_1io_1_1_input_node.html" title="Represents an input node in a computational graph.">InputNode</a></code> is used to provide data to the computational graph, but since it doesn't have parameters, there is no need to propagate gradients through it.</li>
</ul>
</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="#a4ba34603676c094723409d9e6b770976" title="Forward pass for the InputNode.">forward()</a> for the <a class="el" href="#a4ba34603676c094723409d9e6b770976" title="Forward pass for the InputNode.">forward</a> pass computation method.</dd></dl>
<dl class="section author"><dt>Author</dt><dd>Mgepahmge (<a href="https://github.com/Mgepahmge">https://github.com/Mgepahmge</a>)</dd></dl>
<dl class="section date"><dt>Date</dt><dd>2024/11/29 </dd></dl>

<p>Implements <a class="el" href="classnz_1_1nodes_1_1_node.html#a0a9ecbaa3d790ba38e8218aca7837fd0">nz::nodes::Node</a>.</p>

<p class="definition">Definition at line <a class="el" href="_nodes_8cu_source.html#l00049">49</a> of file <a class="el" href="_nodes_8cu_source.html">Nodes.cu</a>.</p>

</div>
</div>
<a id="a4ba34603676c094723409d9e6b770976" name="a4ba34603676c094723409d9e6b770976"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4ba34603676c094723409d9e6b770976">&#9670;&#160;</a></span>forward()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void nz::nodes::io::InputNode::forward </td>
          <td>(</td>
          <td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Forward pass for the <code><a class="el" href="classnz_1_1nodes_1_1io_1_1_input_node.html" title="Represents an input node in a computational graph.">InputNode</a></code>. </p>
<p>The <code><a class="el" href="#a4ba34603676c094723409d9e6b770976" title="Forward pass for the InputNode.">forward()</a></code> method for the <code><a class="el" href="classnz_1_1nodes_1_1io_1_1_input_node.html" title="Represents an input node in a computational graph.">InputNode</a></code> is a no-op (no operation) because the input node does not perform any computations during the forward pass. Its primary role is to provide the input data to the computational graph.</p>
<p>Since the <code><a class="el" href="classnz_1_1nodes_1_1io_1_1_input_node.html" title="Represents an input node in a computational graph.">InputNode</a></code> does not modify its data or perform any calculations, the <code><a class="el" href="#a4ba34603676c094723409d9e6b770976" title="Forward pass for the InputNode.">forward()</a></code> method does not need to be implemented with any functionality, and it is left empty. The tensor stored in the <code>output</code> member will simply be passed along to the next nodes in the computational graph during the forward pass.</p>
<dl class="section note"><dt>Note</dt><dd><ul>
<li>This method is a required implementation due to inheritance from the abstract <code><a class="el" href="classnz_1_1nodes_1_1_node.html" title="Base class for nodes in a neural network or computational graph.">Node</a></code> class, but it does not perform any operations for <code><a class="el" href="classnz_1_1nodes_1_1io_1_1_input_node.html" title="Represents an input node in a computational graph.">InputNode</a></code>. It serves as a placeholder to conform to the <code><a class="el" href="classnz_1_1nodes_1_1_node.html" title="Base class for nodes in a neural network or computational graph.">Node</a></code> class interface.</li>
<li>The <code><a class="el" href="classnz_1_1nodes_1_1io_1_1_input_node.html" title="Represents an input node in a computational graph.">InputNode</a></code> only holds input data, and its <code><a class="el" href="#a4ba34603676c094723409d9e6b770976" title="Forward pass for the InputNode.">forward()</a></code> method ensures that the data is available for the subsequent nodes in the graph.</li>
</ul>
</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="#a3cde8af9401a117601dcdb0c9063516a" title="Backward pass for the InputNode.">backward()</a> for the reverse propagation (gradient calculation) method.</dd></dl>
<dl class="section author"><dt>Author</dt><dd>Mgepahmge (<a href="https://github.com/Mgepahmge">https://github.com/Mgepahmge</a>)</dd></dl>
<dl class="section date"><dt>Date</dt><dd>2024/11/29 </dd></dl>

<p>Implements <a class="el" href="classnz_1_1nodes_1_1_node.html#a8a828c2e91a4aa2a9ab7b94554e4685b">nz::nodes::Node</a>.</p>

<p class="definition">Definition at line <a class="el" href="_nodes_8cu_source.html#l00046">46</a> of file <a class="el" href="_nodes_8cu_source.html">Nodes.cu</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>D:/Users/Mgepahmge/Documents/C Program/NeuZephyr/include/NeuZephyr/<a class="el" href="_nodes_8cuh_source.html">Nodes.cuh</a></li>
<li>D:/Users/Mgepahmge/Documents/C Program/NeuZephyr/src/<a class="el" href="_nodes_8cu_source.html">Nodes.cu</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.12.0
</small></address>
</div><!-- doc-content -->
</body>
</html>
